Telegram Group & Telegram Channel
Для синхронизации или передаче данных между разными вкладками можно использовать LocalStorage

Во Vue можно даже сделать реактивную обертку.

Но можно гораздо проще и эффективней - через Broadcast Channel API. C помощью него можно создавать канал, постить в него сообщения и слушать сообщения приходящие в этот канал.


// Создаем канал
const bc = new BroadcastChannel("share_channel");

// Посылаем сообщение в канал
bc.postMessage("Сообщение какое-то");

// Ловим событие в канале
bc.onmessage = (event) => {
console.log(event);
};


Также postMessage можно использовать для связи открытых окон ( login ) с родительским окном - window.opener.postMessage()

#js



tg-me.com/vuefaq/1415
Create:
Last Update:

Для синхронизации или передаче данных между разными вкладками можно использовать LocalStorage

Во Vue можно даже сделать реактивную обертку.

Но можно гораздо проще и эффективней - через Broadcast Channel API. C помощью него можно создавать канал, постить в него сообщения и слушать сообщения приходящие в этот канал.


// Создаем канал
const bc = new BroadcastChannel("share_channel");

// Посылаем сообщение в канал
bc.postMessage("Сообщение какое-то");

// Ловим событие в канале
bc.onmessage = (event) => {
console.log(event);
};


Также postMessage можно использовать для связи открытых окон ( login ) с родительским окном - window.opener.postMessage()

#js

BY Vue-FAQ




Share with your friend now:
tg-me.com/vuefaq/1415

View MORE
Open in Telegram


Vue FAQ Telegram | DID YOU KNOW?

Date: |

To pay the bills, Mr. Durov is issuing investors $1 billion to $1.5 billion of company debt, with the promise of discounted equity if the company eventually goes public, the people briefed on the plans said. He has also announced plans to start selling ads in public Telegram channels as soon as later this year, as well as offering other premium services for businesses and users.

That growth environment will include rising inflation and interest rates. Those upward shifts naturally accompany healthy growth periods as the demand for resources, products and services rise. Importantly, the Federal Reserve has laid out the rationale for not interfering with that natural growth transition.It's not exactly a fad, but there is a widespread willingness to pay up for a growth story. Classic fundamental analysis takes a back seat. Even negative earnings are ignored. In fact, positive earnings seem to be a limiting measure, producing the question, "Is that all you've got?" The preference is a vision of untold riches when the exciting story plays out as expected.

Vue FAQ from ms


Telegram Vue-FAQ
FROM USA